<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');
require('lib/is_admin.php');

$_category = "warmath";
$_title = "Admin / Schedule a Raid: Step 1 of 2";
require('lib/head.php');


$itier = $system["system_tier"];
boxTop("Warmath: $_title");
?>
<b>Schedule a Raid</b><br /><br />
<form action="schedule-raid-2.php" method="post">
<input type="hidden" value="<?=$system["system_id"]?>" name="system_id">
<i>Instance</i><br/>
<select name="instance_id">
<?php
$sql = "select * from wm_instances where instance_tier = $itier";
$result = $db->query($sql);
$i = 0;
while($inst = $db->fetch_assoc($result)) {
  $i++;
  $chk = "";
  if($i==1) {
    $chk = " selected";
  }
?>
<option value="<?=$inst["instance_id"]?>"<?=$chk?>><?=$inst["instance_name"]?>

<?php
}
?> 

</select>
<br />
<input type="submit" name="submit" value="Continue"><br />
</form>
<?php
boxBot();
?>

<?php
require('lib/foot.php');
?>

